home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Linux Cubed Series 7: Sunsite
/
Linux Cubed Series 7 - Sunsite Vol 1.iso
/
system
/
filesyst
/
dosfs
/
dmsdosfs.000
/
dmsdosfs
/
dmsdosfs-0.6.9b
/
defrag.sh
< prev
next >
Wrap
Linux/UNIX/POSIX Shell Script
|
1996-07-02
|
389b
|
20 lines
#!/bin/sh
# Usage: defrag device cvfname
# Examle: defrag /dev/hda1 dblspace.000
if [ $# != 2 ]; then
echo "Usage: defrag device cvfname"
echo "Example: defrag /dev/hda1 dblspace.000"
exit 1
fi
mkdir /tmp/mountpoint
if ! mount -t dmsdos -o nofix $1 /tmp/mountpoint ; then
rmdir /tmp/mountpoint
exit 1
fi
ddefrag /tmp/mountpoint/$2
umount /tmp/mountpoint
rmdir /tmp/mountpoint